const getters = {
  // app
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  theme: state => state.app.theme,
  layout: state => state.app.layout,
  
  // user
  token: state => state.user.token,
  userInfo: state => state.user.userInfo,
  roles: state => state.user.roles,
  permissions: state => state.user.permissions,
  name: state => state.user.userInfo ? state.user.userInfo.name : '',
  avatar: state => state.user.userInfo ? state.user.userInfo.avatar : '',
  
  // permission
  routes: state => state.permission.routes,
  addRoutes: state => state.permission.addRoutes,
  
  // tagsView
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews
};

export default getters; 